package com.tiger.ebenv.sample3;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

public class StockPrices implements java.io.Serializable {
    private Date date;
    private Map stockPriceMap;
    public StockPrices(Date date) {
        this.date = date;
        stockPriceMap = new HashMap();
    }
    public Date getDate() {
        return date;
    }
    public void addStockPrice(String company, double price) {
        stockPriceMap.put(company, new Double(price));
    }
    public java.util.Set getCompanies() {
        return stockPriceMap.keySet();
    }
    public double getPrice(String company) {
        return ((Double)stockPriceMap.get(company)).doubleValue();
    }
}
